/***
 * 树Recrod的解析
 */

Ext.define('Pearlsen.PTreeReader', {
	extend: 'Ext.data.reader.Json',
	alias : 'reader.ptree',
	totalProperty:'page.total',
    buildExtractors : function() {
        var me = this;
        me.callParent(arguments);
        me.getRoot = function(o){
    		if( o.record){
    			return o.record;
    		}else{
    			return o.children;
    		}
        };
     }
});